package com.b511.swpu.cementbackend.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Range;

import javax.persistence.*;

@Entity
@Getter
@Setter
@Accessors(chain = true)
// 套管表 对应表 CM_CASING_TABLE
public class CM_CasingTable extends BABaseEntity {
    @Id
    @GenericGenerator(name="casingTableGenerator", strategy="uuid")
    @GeneratedValue(generator="casingTableGenerator")
    private String CM_CasingTable_ID;

    @Basic
    @Column(name = "CASINGSIZE")
    private Double casingSize;

    @Basic
    @Column(name = "NO")
    private Integer NO;

    @Basic
    @Column(name = "LENGTH")
    private Double length;

    @Basic
    @Column(name = "TOTALLENGTH")
    private Double totalLength;

    @Basic
    @Column(name = "TOPDEPTH")
    private Double topDepth;

    @Basic
    @Column(name = "WEIGHT")
    private Double weight;

    @Basic
    @Column(name = "DISCHARGEVOL")
    private Double dischargeVol;

    @Basic
    @Column(name = "CENTRALIZERMODEL", length = 150)
    private String centralizerModel;

    @Basic
    @Column(name = "BA_WELL_ID")
    @JsonIgnore
    private Long ba_well_id;

    @ManyToOne
    @JoinColumn(name="cm_basic_id")
    private CM_Basic basic;

}
